#include <iostream>
#include <pthread.h>
#include <string>
#include <cstring>
#include <unistd.h>

void* Routine(void*)
{
  while(true){
    printf("I am a thread!\n");
    sleep(1);
  }
}

void MyTest()
{
  pthread_t tid;
  int ret;
  if((ret = pthread_create(&tid, nullptr, Routine, nullptr)) != 0){
    fprintf(stderr, "pthread_create : %s\n", strerror(ret));
    exit(EXIT_FAILURE);
  }
}

int main()
{
  MyTest();
  return 0;
}
